cmake_minimum_required(VERSION 3.0.0)
project(eyeinhand VERSION 0.1.0)
# 指定使用 C++17 标准
set(CMAKE_CXX_STANDARD 11)

# 添加 MSVC 的编译选项
if (MSVC)
    add_compile_options(/W0)  # 禁用所有警告
endif()

# 设置OpenCV的路径
set(OpenCV_DIR "D:/opencv/install/x64/vc16/lib")
# 查找OpenCV
find_package(OpenCV REQUIRED)
if (NOT OpenCV_FOUND)
    message(FATAL_ERROR "OpenCV library not found")
else()
    include_directories(${OpenCV_INCLUDE_DIRS})
    include_directories(${OpenCV2_INCLUDE_DIRS})
    link_directories(${OpenCV_LIB_DIR})
endif()

include_directories("D:/PCL/PCL1.11.1/3rdParty/Eigen/eigen3")

SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) # 指定.exe文件输出路径为CmakeList.txt所在目录


#指定.cpp源文件列表并存于变量 DIR_SRCS
file(GLOB  SRCS_LIST
    ./juzhen.cpp
)
add_executable(${PROJECT_NAME} ${SRCS_LIST}) # 基于指定的源文件，创建可执行文件
target_link_libraries( ${PROJECT_NAME} ${OpenCV_LIBS} ) # 链接 目标和其依赖项所要使用的库。

include(CTest)
enable_testing()

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
